<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>美的官网(Midea) -美的集团官方商城网站，直营空调、冰箱、洗衣机、压力锅、电烤箱、面包机等电器</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/xiangqing.css">

    <link rel="icon" type="x-con" href="https://www.midea.cn//favicon.ico">
</head>

<body>

    <header></header>
    <div id="one">
        <div id="one-con">
            <span><a href="">首页</a></span>><span><a href="">冰箱</a></span>><span>BCD-606WKPZM(E)</span>
        </div>
        <!-- 放大镜 -->
    </div>
    <div id="two">
        <div id="two-con">
            <div id="two-con-left">
                <div class="small-box">
                    <img src="" alt="">
                    <div class="mask"></div>
                </div>
                <div class="big-box">

                </div>
                <ul class="lis">
                <!--<li style="background-image: url(img/gouwuche/1.jpg);"></li>
                    <li style="background-image: url(img/gouwuche/2.jpg);"></li>
                    <li style="background-image: url(img/gouwuche/3.jpg);"></li>
                    <li style="background-image: url(img/gouwuche/4.jpg);"></li>
                    <li style="background-image: url(img/gouwuche/5.jpg);"></li> -->
                </ul>
            </div>
            <div id="two-con-right">
                <p>
                    <span>自营</span>
                    <span>优选热卖</span>
                    <span class="sp"></span>
                </p>
                <span>极速保价</span>
                <span>美居APP激活赠送3年主件延保金卡，详情请联系客服</span>
                <div id="time">
                    <img src="img/gouwuche/l.gif" alt="">
                    <span id="o">距活动结束:</span>
                    <span id="div"></span>
                </div>
                <div id="price">
                 <p>¥<span class="pr"></span></p>
                    <span></span>
                    <img src="img/gouwuche/m.gif" alt=""><br>
                    <p class="p">开通PRO会员，预计可省<span>170元</span>仅169元开通 ></p>
                </div>
                <div id="con">
                    <span>优惠</span>
                    <span>满赠</span>
                    <span>下单购买冰箱冷柜实付满1999元送电动绞肉机/和平精英联名煎锅2选1,
 </span><br>
                    <span>场景套装</span>

                    <span>下单购买冰箱冷柜实付满1999元送电动绞肉机/和平精英联名煎锅2选1</span> <br><span>送赠品</span><span>最高送309积分</span>

                </div>
                <div id="con-a">
                    <span>领券</span>
                    <span>满2件9.7折最高减1000元</span>
                </div>
                <div id="con-b">
                    <span>评价</span>
                    <span>性价比高（715）</span>
                    <span>空间大（696）</span>
                    <span>非常好（463）</span>
                </div>
                <div id="con-c">
                    <span>颜色</span>
                    <p><img src="" alt=""><span>泰坦银</span></p>

                </div>
                <div id="con-d">
                    <span>规格</span>
                    <p>660L</p>
                </div>
                <div id="con-e">
                    <span>数量</span>
                    <button class="btn1">-</button>
                    <span id="s" class="goods-num">1</span>
                    <button style="margin-left: 28px;" class="btn2">+</button>
                    <span>库存271</span>

                    <span>(限购5件)</span>
                </div>
                <div id="con-f">
                    <span>配送</span>
                    <select name="" id="">
                    <option value="">广东省 广州市 天河区</option></select>
                    <lect>
                        <span>有货</span>
                </div>
                <div id="con-g">
                    <span>服务</span>
                    <span id="ap">
                        延长保修
                    </span>
                </div>
                <div id="con-h">
                    <span>供货商</span>
                    <span id="ap" style=" margin-left: 12px;color:black;">
                       美的冰箱官方旗舰店
                    </span>
                </div>
               <input type="button" value="加入购物车">
                <a href="cart.html"><input type="button" value="立即购买" style=" background-color:#ff5240;"></a>
            </div>
        </div>
    </div>
    <!-- 产品介绍 -->
    <div id="three">
        <ul>
            <li>
                <a href="">产品介绍</a>
            </li>
            <li>
                <a href=""> 评价(1101)</a>
            </li>
            <li>
                <a href="">规格参数</a>
            </li>
            <li>
                <a href="">服务支持</a>
            </li>
            <li>
                <a href="">相关问题</a>
            </li>
        </ul>
    </div>
    <div id="four">
        <img src="img/gouwuche/img/1.jpg" alt="">
        <img src="img/gouwuche/img/2.jpg" alt="">
        <img src="img/gouwuche/img/3.jpg" alt="">
        <img src="img/gouwuche/img/4.jpg" alt="">
        <img src="img/gouwuche/img/5.jpg" alt="">
        <img src="img/gouwuche/img/6.jpg" alt="">
        <img src="img/gouwuche/img/7.jpg" alt="">
        <img src="img/gouwuche/img/8.jpg" alt="">
        <img src="img/gouwuche/img/9.jpg" alt="">
        <img src="img/gouwuche/img/10.jpg" alt="">
        <img src="img/gouwuche/img/11.jpg" alt="">
        <img src="img/gouwuche/img/12.jpg" alt="">
        <img src="img/gouwuche/img/13.jpg" alt="">
        <img src="img/gouwuche/img/14.jpg" alt="">
        <img src="img/gouwuche/img/15.jpg" alt="">
        <img src="img/gouwuche/img/16.jpg" alt="">
        <img src="img/gouwuche/img/17.jpg" alt="">
        <img src="img/gouwuche/img/18.jpg" alt="">
        <img src="img/gouwuche/img/19.jpg" alt="">
        <img src="img/gouwuche/img/20.jpg" alt="">
        <img src="img/gouwuche/img/21.jpg" alt="">
        <img src="img/gouwuche/img/22.jpg" alt="">
        <img src="img/gouwuche/img/23.jpg" alt="">
        <img src="img/gouwuche/img/24.jpg" alt="">
        <img src="img/gouwuche/img/25.jpg" alt="">
        <img src="img/gouwuche/img/26.jpg" alt="">
        <div>
            <p>|划线价格:</p>
            <span> 指商品专柜价、吊牌价、正品零售价、厂商指导价或该商品的曾经展示过的销售价等，并非原价，仅供參考。</span>
            <p> |未划线价格: </p>
            <span> 指商品的实时标价，不因表述的差异改变性质。具体成交价格根据商品参加活动，或会员使用优惠券、积分等发生变化，最终以订单结算页价格为
        准。</span>
            <span> 商家详情页(含主图)以图片成文字形式标注的- -口价、促销价、优惠价等价格可能是在使用优惠券、满减或特定优惠活动和时段等情形下的价格.
        具体请以结算页面的标价、优惠条件或活动规则为准。</span>
            <span> 此说明仅当出现价格比较时有效，如有疑问，您可在购买前联系客服进行咨询。</span></div>







    </div>

    <footer></footer>





</body>

</html>
<script src="js/jQuery.js"></script>
<script src="js/xiangqing.js"></script>
<script>
    $("header").load("head.html");
    $("footer").load("footer.html");
/*详情页放大镜接口*/
    let str=location.search.split("=")[1];
    console.log(str);
    $.get("./goodsAndShoppingCart/getGoodsInfo.php",`goodsId=${str}`,function(date){
    let obj=JSON.parse(date);
    console.log(obj);
    $(".pr").html(`${obj.goodsPrice}`+".00")
    $(".sp").html("【一级能效】"+`${obj.beiyong6}`)
    $("#price span").eq(1).html("¥"+`${obj.beiyong7}`+".00")
    $("#con-c p img").prop('src',`${obj.goodsImg}`)
    let olis=
                  ` <li style="background-image: url('${obj.beiyong1}');"></li>
                    <li style="background-image: url('${obj.beiyong2}');"></li>
                    <li style="background-image: url('${obj.beiyong3}');"></li>
                    <li style="background-image: url('${obj.beiyong4}');"></li>
                    <li style="background-image: url('${obj.beiyong5}');"></li>`
                   $(".lis").append(olis);
    $(".small-box").css({
        backgroundImage:
      `${$(".lis li").eq(0).css("backgroundImage") }`
    })
    $(".big-box").css({
        backgroundImage:
      `${$(".lis li").eq(0).css("backgroundImage")} `
    })


    $(".lis li").on("click",function () {
         $(".small-box").css({
        backgroundImage: 
        ` ${$(this).css("backgroundImage")} `
       }),
       $(".big-box").css({
        backgroundImage: 
        ` ${$(this).css("backgroundImage")}`
       })   
    })     
   
});

/*添加到购物车接口*/

$(function () {
    $("input").eq(0).click(function () {

        $.post("./goodsAndShoppingCart/addShoppingCart.php",
        {
vipName:localStorage.getItem("username"),
goodsId:location.search.split("=")[1],
goodsCount:$(".goods-num").html()
},
    function (date) {
        console.log(date)
        if(date.trim()=="1"){
          alert("加入购物车成功")
          location.href=("cart.html")
        }else{
             alert("加入购物车失败")
        }
    }
    )

})     
}())
   
</script>